﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DetaileShow.aspx.cs" Inherits="FPC.Offer.UI.Message.DetaileShow" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico">
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <link href="../H-ui/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/H-ui.admin.css" rel="stylesheet" />
    <link href="../H-ui/Lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/skin/default/skin.css" rel="stylesheet" />
    <link href="../H-ui/static/h-ui.admin/css/style.css" rel="stylesheet" />
     <script src="../H-ui/Lib/jquery-form.js"></script>
    <title>新建网站角色 - 管理员管理 - H-ui.admin v3.0</title>
    <meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
    <meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
   <article class="page-container">
	<form class="form form-horizontal" id="form-article-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">信息标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value=""  id="Title" name="articletitle">
			</div>
		</div>

		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">信息内容：</label>
			<div class="formControls col-xs-8 col-sm-9"> 
				<textarea id="Content" name="elm1" class="xheditor" rows="5" cols="40"></textarea><br /><br />
			</div>
		</div>
        <div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">发送人：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value=""  id="FromUser" name="articletitle2">
			</div>
		</div>
        		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">发送时间：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value=""  id="Date" name="articletitle2">
                <input type="hidden" id="ID" />
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onClick="UpdateState();" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 标为已读并退出</button>
			</div>
		</div>
	</form>
</article>
    <script type="text/javascript" src="../H-ui/Lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../H-ui/Lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="../H-ui/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="../H-ui/static/h-ui.admin/js/H-ui.admin.js"></script>   
    <script type="text/javascript">  
        //页面加载，显示信息详情
        $(function () {
            var url = location.search;
            alert(url);
            var ReceiveId = url.substring(url.indexOf("=") + 1);
            alert(ReceiveId);
            $.ajax({
                type: "post",
                url: "../GeneralProcessor/Message/Details.ashx",
                data: {
                    Actioon: "<%=FPC.Offer.Common.EnumAction.Select %>",
                    ReceiveId: ReceiveId,
                },
                success: function (res) {
                    var data = JSON.parse(res);
                    alert(data);
                    $(data).each(function (i, item) {
                        $("#Title").val(item.MessageTitle);
                        $("#Content").val(item.MessageContent);
                        $("#Date").val(item.MessageDate);
                        $("#FromUser").val(item.FromUser);
                        $("#ID").val(item.ReceiveID);
                    })
                    
                   
                }
            })
        })
        //修改信息状态 标为已读
        function UpdateState()
        {
            var id = $("#ID").val();
            alert(id);
            $.ajax({
                type: "post",
                url: "../GeneralProcessor/Message/Details.ashx",
                data: {
                    Actioon: "<%=FPC.Offer.Common.EnumAction.Update %>",
                    ReceiveId: id
                },
                success: function (res) {
                    if (res > 0)
                    {
                        layer_close();
                        location.reload();
                    }
                }
            })
        }

    </script>
</body>
</html>
